package com.stylefeng.guns.common.persistence.dao;

import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import com.stylefeng.guns.common.persistence.model.TOrderFee;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author xiejie123
 * @since 2018-01-28
 */
public interface TOrderFeeMapper extends BaseMapper<TOrderFee> {


    List<Map<String,Object>> selectOrderFeeList(Pagination page,Map param);
    List<Map<String,Object>> selectFeeList(@Param("ids")List<Integer> ids);
    /**
     * 获取可使用的费用类型
     * @param deptid
     * @return
     */
    List<Map<String,Object>> getFee( @Param("deptid") String deptid);

    List<Map<String,Object>> selectOrderFeeOffList(Pagination page,Map param);

    List<Map<String,Object>> selectOrderFeeOffSum(Map param);

    List<Map<String,Object>> selectOrderFeeLSum(Map param);

    List<Map<String,Object>> selectUpFeeid( @Param("order_id") String order_id,
                                            @Param("use_object") String use_object);

    int updateOrderFee( @Param("pay_mode") String pay_mode,
                        @Param("order_id") String order_id,
                        @Param("use_object") String use_object);

    int delFee(@Param("order_id") String order_id,@Param("ids")List<Integer> ids);
    List<TOrderFee> selectOrderFee(@Param("order_id") String order_id,@Param("ids")List<Integer> ids);

    void revokeOrderFee(String order_id);
    int batchOrderFeeAuditStatus(@Param("audit_status") String audit_status,
                              @Param("balance_id") String balance_id,
                              @Param("ids")List<Integer> ids);

    long sumOrderFee(@Param("order_id") String order_id);

}
